<script type="text/javascript">
    var map;
var infowindow = new google.maps.InfoWindow();
var centro = new google.maps.LatLng(10.410368,-66.882255);


  // Note: this value is exact as the map projects a full 360 degrees of longitude
  var GALL_PETERS_RANGE_X = 800;

  // Note: this value is inexact as the map is cut off at ~ +/- 83 degrees.
  // However, the polar regions produce very little increase in Y range, so
  // we will use the tile size.
  var GALL_PETERS_RANGE_Y = 510;

  function degreesToRadians(deg) {
    return deg * (Math.PI / 180);
  }

  function radiansToDegrees(rad) {
    return rad / (Math.PI / 180);
  }

  function GallPetersProjection() {

    // Using the base map tile, denote the lat/lon of the equatorial origin.
    this.worldOrigin_ = new google.maps.Point(GALL_PETERS_RANGE_X * 400 / 800,
        GALL_PETERS_RANGE_Y / 2);

    // This projection has equidistant meridians, so each longitude degree is a linear
    // mapping.
    this.worldCoordinatePerLonDegree_ = GALL_PETERS_RANGE_X / 360;

    // This constant merely reflects that latitudes vary from +90 to -90 degrees.
    this.worldCoordinateLatRange = GALL_PETERS_RANGE_Y / 2;
  };

  GallPetersProjection.prototype.fromLatLngToPoint = function(latLng) {

    var origin = this.worldOrigin_;
    var x = origin.x + this.worldCoordinatePerLonDegree_ * latLng.lng();

    // Note that latitude is measured from the world coordinate origin
    // at the top left of the map.
    var latRadians = degreesToRadians(latLng.lat());
    var y = origin.y - this.worldCoordinateLatRange * Math.sin(latRadians);

    return new google.maps.Point(x, y);
  };

  GallPetersProjection.prototype.fromPointToLatLng = function(point) {

    var y = point.y;
    var x = point.x;

    if (y < 0) {
      y = 0;
    }
    if (y >= GALL_PETERS_RANGE_Y) {
      y = GALL_PETERS_RANGE_Y;
    }

    var origin = this.worldOrigin_;
    var lng = (x - origin.x) / this.worldCoordinatePerLonDegree_;
    var latRadians = Math.asin((origin.y - y) / this.worldCoordinateLatRange);
    var lat = radiansToDegrees(latRadians);
    return new google.maps.LatLng(lat, lng);
  };
/* Onload Actions
 *******************************************************************************/
$.(function(){
    initialize();
});

/* Functions
 *******************************************************************************/
function initialize() {
    var gallPetersMap;
    
    var latlng = centro;
    var myOptions = {
       zoom: 16,
        draggable: true,
        scrollwheel: false,
        center: latlng,
        navigationControl: true,
         navigationControlOptions: {
            style: google.maps.NavigationControlStyle.SMALL
        },
        mapTypeControl: true,
        mapTypeId: google.maps.MapTypeId.HYBRID
    };
   var gallPetersMapType = new google.maps.ImageMapType({
      getTileUrl: function(coord, zoom) {
        var numTiles = 1 << zoom;

        // Don't wrap tiles vertically.
        if (coord.y < 0 || coord.y >= numTiles) {
          return null;
        }

        // Wrap tiles horizontally.
        var x = ((coord.x % numTiles) + numTiles) % numTiles;

        // For simplicity, we use a tileset consisting of 1 tile at zoom level 0
        // and 4 tiles at zoom level 1. Note that we set the base URL to a relative
        // directory.
        var baseURL = 'images/';
        baseURL += 'gall-peters_' + zoom + '_' + x + '_' + coord.y + '.png';
        return baseURL;
      },
      tileSize: new google.maps.Size(800,512),
      minZoom: 0,
      maxZoom: 18
    });
    gallPetersMapType.projection = new GallPetersProjection();  
     gallPetersMap = new google.maps.Map(document.getElementById("map_canvas"),
        myOptions);

    gallPetersMap.mapTypes.set('gallPetersMap', gallPetersMapType);
    gallPetersMap.setMapTypeId('gallPetersMap');

    google.maps.event.addListener(gallPetersMap, 'click', function(event) {
      alert("Point.X.Y: " + event.latLng);
    });
  }
</script>
<input type="text" id="coordPointX"><input type="text" id="coordPointY">
        <div id="mapContent">
    <h1 class="title">
        SIGSI - Universidad Sim&oacute;n Bol&iacute;var
    </h1>
    <hr>
    <div id="mapMsg"></div>
    <div id="map_canvas"></div>
    <div id="map_Piso"></div>
</div>
<script type="text/javascript">
    $(function(){
        initialize();
    });
</script>